<template>
<main>
<div class="list" v-for="(item,index) in tankList" :key="index">
    <div class="img">
        <img src="https://tse4-mm.cn.bing.net/th/id/OIP-C.1jt-mM7nGA1IRirbyMinowHaFC?pid=ImgDet&rs=1" alt="">
    </div>
        <div class="listright">
            <span>{{item.goodsname}}</span>
            <p>{{item.content}}</p>
            <div class="listbottom">
                <p>￥{{item.price}}</p>
                <div class="but" @click="qiang(item)" >{{item.status==1?'马上抢':'已抢'}}</div>
            </div>
        </div>
    </div>
</main>
</template>

<script>
// import img from '../assets/img/1.png'
export default {
    data(){
        return {
            tankList:[
                {goodsname:'汉堡王|北美新天地餐厅',content:'买1送1明星皇堡|用心火烤肉质紧实鲜嫩多汁爆爆团',price:25,status:1},
                {goodsname:'华莱士|北美新天地餐厅',content:'华莱士|用心火烤肉质紧实鲜嫩多汁爆爆团',price:12.12,status:1},
                {goodsname:'鸡你太美|北美新天地餐厅',content:'练习两年半|用心火烤肉质紧实鲜嫩多汁爆爆团',price:999,status:1}
            ]
        }
    },
    methods:{
        qiang(item){
            // console.log(23);
           if(item.status==1){
            item.status=2
           }
        }
    }

}
</script>
<style>
 main{
    width: 100%;
    height: 350px;
    /* background-color: lawngreen; */
    overflow: hidden;
 }
 main .list{
    box-shadow: 0px 0px 6px;
    width: 280px;
    height: 115px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    box-sizing: border-box;
 }
 main .list .img{
    height: 90px;
    width: 90px;
    /* background-color: forestgreen; */
    margin: 5px;
    box-sizing: border-box;
 }
  main .list .img img{
    width: 100%;
    padding-top: 10px;
  }
 main .listright{
    width: 200px;
    height: 100px;
    /* background-color: yellowgreen; */
    /* margin-left: 5px; */
 }
 .listright span:nth-child(1){
    font-size: 12px;
    color: rgb(123, 120, 120);
 }
 .listright p{
    font-size: 16px;
    font-weight: 700;
 }
 .listbottom{
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
 }
 .listbottom p{
    color: red;
    font-size: 14px;
 }
 .listbottom .but{
    width: 55px;
    height: 20px;
    text-align: center;
    font-size: 12px;
    margin-right: 10px;
    color: antiquewhite;
    border-radius: 15px;
    background-color: red;
 }
</style>